home *** CD-ROM | disk | FTP | other *** search
- function MixCup()
- {
- mixCup.onPress = function()
- {
- this.swapDepths(dpts);
- startDrag(this,0);
- ins4._visible = false;
- };
- mixCup.onRelease = function()
- {
- if(pan.hitTest(this))
- {
- stopDrag();
- this.gotoAndPlay(2);
- this._x = -112.6;
- this._y = 78;
- dpts++;
- }
- };
- }
- function Knief()
- {
- knief.onPress = function()
- {
- this.swapDepths(dpts);
- startDrag(this,0);
- };
- knief.onRelease = function()
- {
- if(cutter.hitTest(this) && cutColiFlower.hitTest(this))
- {
- if(_global.dd == 0)
- {
- this._visible = false;
- cutColiFlower.gotoAndPlay(2);
- dpts++;
- }
- }
- if(cutter.hitTest(this) && cutOnion.hitTest(this))
- {
- if(_global.dd == 1)
- {
- this._visible = false;
- cutOnion.gotoAndPlay(2);
- dpts++;
- }
- }
- if(cutter.hitTest(this) && cutCelery.hitTest(this))
- {
- if(_global.dd == 2)
- {
- this._visible = false;
- cutCelery.gotoAndPlay(2);
- dpts++;
- }
- }
- };
- }
- stop();
- _root.ggt._visible = true;
- mixCup._visible = false;
- pan.forzen._visible = false;
- cooker._visible = false;
- mixer._visible = false;
- coliFlower.flr._visible = false;
- onionPlate.flr._visible = false;
- celeryPlate.flr._visible = false;
- var dpts = 10;
- var r = 1;
- var i = 2;
- while(i <= 20)
- {
- eval("ins" + i)._visible = false;
- i++;
- }
- bridge.onPress = function()
- {
- this.swapDepths(dpts);
- bridge.gotoAndPlay(2);
- ins1._visible = false;
- delete bridge.onPress;
- dpts++;
- };
- var tun = 0;
- _global.Tunner = function()
- {
- stove.tunner1.onPress = function()
- {
- ins3._visible = false;
- stove.tunner._rotation += 30;
- if(tun == 2)
- {
- stove.tunner1.enabled = false;
- pan.forzen._visible = true;
- pan.forzen.gotoAndPlay(2);
- ins4._visible = true;
- MixCup();
- }
- tun++;
- };
- };
- _global.dd = 0;
- _global.TweenFun = function(posx, posy, obj)
- {
- var _loc2_ = new mx.transitions.Tween(obj,"_x",mx.transitions.easing.Strong.easeOut,obj._x,posx,0.5,true);
- _loc2_ = new mx.transitions.Tween(obj,"_y",mx.transitions.easing.Strong.easeOut,obj._y,posy,0.5,true);
- _loc2_.onMotionFinished = function()
- {
- r = 1;
- };
- };
- _global.CutColiFlower = function()
- {
- cutColiFlower.onPress = function()
- {
- ins5._visible = false;
- if(r == 1)
- {
- this.swapDepths(dpts);
- startDrag(this,1);
- r = 0;
- }
- };
- cutColiFlower.onRelease = function()
- {
- if(cutter.hitTest(this))
- {
- stopDrag();
- TweenFun(26,119,this);
- knief.enabled = true;
- Knief();
- dpts++;
- }
- else if(cPlate.hitTest(this))
- {
- stopDrag();
- TweenFun(-62,-119,this);
- knief.enabled = false;
- }
- };
- };
- _global.CutOnion = function()
- {
- cutOnion.onPress = function()
- {
- ins6._visible = false;
- if(r == 1)
- {
- this.swapDepths(dpts);
- startDrag(this,0);
- r = 0;
- }
- };
- cutOnion.onRelease = function()
- {
- if(cutter.hitTest(this))
- {
- stopDrag();
- TweenFun(26,119,this);
- knief.enabled = true;
- Knief();
- dpts++;
- }
- else if(oPlate.hitTest(this))
- {
- stopDrag();
- TweenFun(-122.7,-118.8,this);
- knief.enabled = false;
- }
- };
- };
- _global.CutCelery = function()
- {
- cutCelery.onPress = function()
- {
- ins7._visible = false;
- if(r == 1)
- {
- this.swapDepths(dpts);
- startDrag(this,0);
- r = 0;
- }
- };
- cutCelery.onRelease = function()
- {
- if(cutter.hitTest(this))
- {
- stopDrag();
- TweenFun(26,119,this);
- knief.enabled = true;
- Knief();
- dpts++;
- }
- else if(celPlate.hitTest(this))
- {
- stopDrag();
- TweenFun(3,-113.8,this);
- knief.enabled = false;
- }
- };
- };
- _global.Bowl = function()
- {
- bowl.onPress = function()
- {
- ins8._visible = false;
- cutter._visible = false;
- this.swapDepths(dpts);
- startDrag(this,1);
- };
- bowl.onRelease = function()
- {
- if(hitbwl.hitTest(this))
- {
- stopDrag();
- TweenFun(35,100,this);
- this._width = 82.7;
- this._height = 61.7;
- cutColiFlower._visible = false;
- cutOnion._visible = false;
- cutCelery._visible = false;
- coliFlower.flr._visible = true;
- onionPlate.flr._visible = true;
- celeryPlate.flr._visible = true;
- ins9._visible = true;
- delete bowl.onPress;
- delete bowl.onRelease;
- ColiFlower();
- dpts++;
- }
- };
- };
- _global.ColiFlower = function()
- {
- coliFlower.onPress = function()
- {
- this.swapDepths(dpts);
- startDrag(this,0);
- ins9._visible = false;
- };
- coliFlower.onRelease = function()
- {
- if(bowl.hitTest(this))
- {
- stopDrag();
- this._x = -91.3;
- this._y = 45.6;
- this.gotoAndPlay(2);
- dpts++;
- }
- };
- };
- _global.OnionPlate = function()
- {
- onionPlate.onPress = function()
- {
- ins10._visible = false;
- this.swapDepths(dpts);
- startDrag(this,0);
- };
- onionPlate.onRelease = function()
- {
- if(bowl.hitTest(this))
- {
- stopDrag();
- this._x = -92.8;
- this._y = 45;
- this.gotoAndPlay(2);
- dpts++;
- }
- };
- };
- _global.CeleryPlate = function()
- {
- celeryPlate.onPress = function()
- {
- this.swapDepths(dpts);
- startDrag(this,0);
- ins11._visible = false;
- };
- celeryPlate.onRelease = function()
- {
- if(bowl.hitTest(this))
- {
- stopDrag();
- this._x = -100;
- this._y = 41;
- this.gotoAndPlay(2);
- dpts++;
- }
- };
- };
- _global.MusterPlate = function()
- {
- muster.onPress = function()
- {
- this.swapDepths(dpts);
- startDrag(this,0);
- ins16._visible = false;
- };
- muster.onRelease = function()
- {
- if(bowl.hitTest(this))
- {
- stopDrag();
- this._x = 65;
- this._y = 82;
- this.gotoAndPlay(2);
- dpts++;
- }
- };
- };
- _global.Salt = function()
- {
- salt.onPress = function()
- {
- this.swapDepths(dpts);
- startDrag(this,0);
- ins12._visible = false;
- };
- salt.onRelease = function()
- {
- if(bowl.hitTest(this))
- {
- stopDrag();
- this._x = -20.6;
- this._y = -70.5;
- this.gotoAndPlay(2);
- dpts++;
- }
- };
- };
- _global.Pepper = function()
- {
- pepper.onPress = function()
- {
- this.swapDepths(dpts);
- startDrag(this,0);
- ins13._visible = false;
- };
- pepper.onRelease = function()
- {
- if(bowl.hitTest(this))
- {
- stopDrag();
- this._x = 9.5;
- this._y = -88.6;
- this.gotoAndPlay(2);
- dpts++;
- }
- };
- };
- _global.SourCream = function()
- {
- sourCream.onPress = function()
- {
- this.swapDepths(dpts);
- startDrag(this,0);
- ins14._visible = false;
- };
- sourCream.onRelease = function()
- {
- if(bowl.hitTest(this))
- {
- stopDrag();
- this.gotoAndPlay(2);
- this._x = 92;
- this._y = 98.5;
- dpts++;
- }
- };
- };
- _global.SaladOil = function()
- {
- saladOil.onPress = function()
- {
- this.swapDepths(dpts);
- startDrag(this,0);
- ins15._visible = false;
- };
- saladOil.onRelease = function()
- {
- if(bowl.hitTest(this))
- {
- stopDrag();
- this._x = 84;
- this._y = 109.5;
- this.gotoAndPlay(2);
- dpts++;
- }
- };
- };
- _global.Cooker = function()
- {
- cooker.onPress = function()
- {
- this.swapDepths(dpts);
- startDrag(this,0);
- ins17._visible = false;
- mixCup.nextFrame();
- };
- cooker.onRelease = function()
- {
- if(bowl.hitTest(this))
- {
- stopDrag();
- this._x = 85.7;
- this._y = 99.5;
- this.gotoAndPlay(2);
- dpts++;
- }
- };
- };
- _global.Spoon = function()
- {
- spoon.onPress = function()
- {
- this.swapDepths(dpts);
- startDrag(this,0);
- ins18._visible = false;
- };
- spoon.onRelease = function()
- {
- if(bowl.hitTest(this))
- {
- stopDrag();
- this._visible = false;
- pan._visible = false;
- bowl._visible = false;
- coliFlower._visible = false;
- onionPlate._visible = false;
- celeryPlate._visible = false;
- muster._visible = false;
- stove._visible = false;
- cooker._visible = false;
- salt.nextFrame();
- pepper.nextFrame();
- sourCream.nextFrame();
- saladOil.nextFrame();
- mixer._visible = true;
- mixer.gotoAndPlay(2);
- dpts++;
- }
- };
- };
-